//
//  WCNPListFileDataStore.h
//  WCN
//
//  Created by 杨鑫 on 15/6/16.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface WCNPListFileDataStore : NSObject

#pragma mark - Create

+ (instancetype)shareStore;

/**
 *  path
 *
 *  @param fileName
 *
 *  @return 
 */
- (NSString *)careTemplatePath:(NSString *)fileName;
- (NSString *)careRecordPath:(NSString *)fileName;
- (NSString *)careUploadPath:(NSString *)fileName;

- (BOOL)hasFile:(NSString *)path;

/**
 *  read
 *
 *  @param path
 *
 *  @return
 */
- (NSArray *)readArrayFromFile:(NSString *)path;
- (NSDictionary *)readDicFromFile:(NSString *)path;

/**
 *  save
 *
 *  @param data
 *  @param path
 *  @param success
 */
- (void)saveData:(id)data toFile:(NSString *)path success:(void(^)(void))success;

/**
 *  保存护理记录
 */
- (NSArray *)saveCareRecords:(NSArray *)records toFile:(NSString *)path success:(void(^)(void))success;

- (void)deletePrivateFiles;
- (void)deleteFiles;
- (void)deleteCacheCaresAfterUpload:(NSString *)path;

@end
